<tagLib name="cx,html" />
<link href="../Public/Css/ui.tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../Public/Js/ui.core.js"></script>
<script type="text/javascript" src="../Public/Js/ui.tabs.js"></script>
<script language="javascript">
$(function(){
	$('#configDiv > ul').tabs(); 
});
</script>
<div id="box">
<h3>配置管理</h3>
<form method="POST" action="{:url('save')}">
<div id="configDiv">
	<ul>
		<li><a href="#basicinfo"><span>基本信息</span></a></li>
		<li><a href="#system"><span>系统设置</span></a></li>
		<li><a href="#comment"><span>评论相关</span></a></li>
		<if condition="!strstr(get_cfg_var('disable_functions'),'fsockopen')">
		<li><a href="#email"><span>邮件通知</span></a></li>
		</if>
		<li><a href="#extra"><span>扩展设置</span></a></li>
	</ul>
	<div id="basicinfo">
		<p><label>　网站名称:</label> <input type="text" name="db_blogname" value="{$options.blogname|Input::forTag}" class="txt option" /></p>
		<p><label>　网站网址:</label> <input type="text" name="db_siteurl" value="{$options.siteurl|Input::forTag}" class="txt option" /></p>
		<p><label>　网站描述:</label> <input type="text" name="db_blogdescription" value="{$options.blogdescription|Input::forTag}" class="txt option" /></p>
		<p><label>网站关键字:</label> <input type="text" name="db_sitekeywords" value="{$options.sitekeywords|Input::forTag}" class="txt option" /></p>
		<p><label>管理员邮箱:</label> <input type="text" name="db_admin_email" value="{$options.admin_email|Input::forTag}" class="txt" /></p>
		<p><label>　备案信息:</label> <input type="text" name="db_icp_information" value="{$options.icp_information|Input::forTag}" class="txt" /></p>
	</div>
	
	<div id="system">
		<p><label>自动保存:</label> <input type="text" name="db_auto_save_time" value="{$options.auto_save_time|Input::forTag}" class="txt" /> 分钟自动保存草稿</p>
		<p><label>自动翻译:</label> 我 <html:select name="db_auto_post_name" options="autoPostNameList" selected="options['auto_post_name']" /> 在短标题为空时, 使用google翻译自动生成短标题</p>
		<p><label> Tag 云图:</label> <html:select name="db_use_balanceTags" options="balanceTagList" selected="options['use_balanceTags']" /></p>
		<p><label> RSS输出:</label> <input type="text" name="db_posts_per_rss" value="{$options.posts_per_rss|Input::forTag}" class="txt" /> 条日志</p>
		<p><label> RSS条目:</label> <html:select name="db_rss_use_excerpt" options="rssExcerptList" selected="options['rss_use_excerpt']" /></p>
		<p><label>默认分类:</label> <html:select name="db_default_category" options="categoryList" selected="options['default_category']" /></p>
		<p><label>列表显示:</label> <input type="text" name="db_posts_per_page" value="{$options.posts_per_page|Input::forTag}" class="txt" /> 条日志</p>
		<p><label>站点状态:</label> <html:select name="db_blog_public" options="statusList" selected="options['blog_public']" /></p>
		<p><label>关闭原因:</label> <input type="text" name="db_close_reason" value="{$options.close_reason|Input::forTag}" class="txt option" /></p>
	</div>
	
	<div id="comment">
		<p><label>&nbsp;&nbsp;&nbsp;用户名邮箱:</label> <html:select name="db_require_name_email" options="nameEmailList" selected="options['require_name_email']" /></p>
		<p><label>默认评论状态:</label> <html:select name="db_default_comment_status" options="statusList" selected="options['default_comment_status']" /></p>
		<p><label>默认引用状态:</label> <html:select name="db_default_ping_status" options="statusList" selected="options['default_ping_status']" /></p>
		<p><label>&nbsp;&nbsp;&nbsp;　评论显示:</label> <html:select name="db_comments_order" options="orderList" selected="options['comments_order']" /></p>
		<p><label>评论需要审核:</label> <html:select name="db_comment_moderation" options="statusList" selected="options['comment_moderation']" /></p>
		<p><label>垃圾评论检查:</label> <input type="text" class="txt" name="db_comment_min_length" value="{$options.comment_min_length|Input::forTag}" /> 字以下视为垃圾评论</p>
		<p><label>过滤敏感词汇:</label> <textarea name="db_moderation_keys" rows="5" cols="30">{$options.moderation_keys|Input::forTarea}</textarea> (每行一个)</p>
	</div>
	
	<if condition="!strstr(get_cfg_var('disable_functions'),'fsockopen')">
	<div id="email">
		<p><label>新评论邮件通知:</label> <html:select name="db_comments_notify" options="notifyList" selected="options['comments_notify']" /></p>
		<p><label>&nbsp; 　SMTP服务器:</label> <input type="text" name="db_mailserver_url" value="{$options.mailserver_url|Input::forTag}" class="txt" /></p>
		<p><label>&nbsp; 　　Email地址:</label> <input type="text" name="db_mailserver_email" value="{$options.mailserver_email|Input::forTag}" class="txt" /></p>
		<p><label>&nbsp; 　SMTP用户名:</label> <input type="text" name="db_mailserver_login" value="{$options.mailserver_login|Input::forTag}" class="txt" /></p>
		<p><label>&nbsp; 　　SMTP密码:</label> <input type="password" name="db_mailserver_pass" value="{$options.mailserver_pass|Input::forTag}" class="txt" /></p>
		<p><label>&nbsp; 　　SMTP端口:</label> <input type="text" name="db_mailserver_port" value="{$options.mailserver_port|Input::forTag}" class="txt" /></p>
	</div>
	</if>
	
	<div id="extra">
		<p><label>附件上传路径:</label> <input type="text" name="EXTRA_UPLOAD_PATH" class="txt option" value="{$user_config.UPLOAD_PATH|Input::forTag}" /></p>
		<p><label>附件允许大小:</label> <input type="text" class="txt" name="EXTRA_ATTACHMENT_SIZE" value="{$user_config.ATTACHMENT_SIZE|Input::forTag}" /> 字节</p>
		<p><label>附件允许类型:</label> <input type="text" class="txt" name="EXTRA_ATTACHMENT_EXT" value="{$user_config.ATTACHMENT_EXT|Input::forTag}" /> 使用半角逗号分隔</p>	
		<p><label>URL解析模式:</label> <html:select name="EXTRA_URL_MODEL" options="urlModeList" selected="user_config['URL_MODEL']" /></p>
		<p><label>　伪静态后缀:</label> <input type="text" name="EXTRA_HTML_URL_SUFFIX" class="txt" value="{$user_config.HTML_URL_SUFFIX|Input::forTag}" /> 例如.html</p>
		<p><label>启用静态缓存:</label> <html:select name="EXTRA_HTML_CACHE_ON" options="boolStatusList" selected="user_config['HTML_CACHE_ON']" /></p>
		<p><label>静态缓存后缀:</label> <input type="text" class="txt" name="EXTRA_HTML_FILE_SUFFIX" value="{$user_config.HTML_FILE_SUFFIX|Input::forTag}" /></p>
		<p><label>静态缓存时限:</label> <input type="text" style="width: 40px;" class="txt" name="EXTRA_HTML_CACHE_TIME" value="{$user_config.HTML_CACHE_TIME|Input::forTag}" /> 秒 (-1表示永久缓存)</p>
		<!--模板配置要在这里放一个hidden的input,让其值不变改变,不然就会丢失这个配置项了-->
		<input type="hidden" name="EXTRA_DEFAULT_TEMPLATE" value="{$user_config.DEFAULT_TEMPLATE}" />
	</div>
</div>
<input type="submit" name="submit" class="btn" value="保存" />
</form>
</div>